package org.base.sys.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.base.common.annotation.JsonEnum;
import org.base.sys.enums.LoginStatus;

import java.time.LocalDateTime;

/**
 * <p>
 * 系统登录记录
 * </p>
 *
 * @author AutoGenerator
 * @since 2020-07-29
 */
@Data
@TableName("t_sys_login_log")
@ApiModel(value = "SysLoginLog对象", description = "系统登录记录")
public class SysLoginLog {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = "登录账号")
    private String loginName;

    @ApiModelProperty(value = "登录IP地址")
    private String ipAddr;

    @ApiModelProperty(value = "登录地点")
    private String loginLocation;

    @ApiModelProperty(value = "浏览器类型")
    private String browser;

    @ApiModelProperty(value = "操作系统")
    private String os;

    @ApiModelProperty(value = "登录状态（0成功 1失败）")
    @JsonEnum(LoginStatus.class)
    private Integer status;

    @ApiModelProperty(value = "提示消息")
    private String msg;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.DEFAULT)
    private LocalDateTime createTime;


}
